<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script type="text/javascript">
$(document).ready(function(){
	$("#testJson").click(function(){
		//通过ajax请求springmvc
	$.post(
		"/NewsManager_SSM/newsServlet/addNew",//服务器地址
		//{"name":"zs","age":23}
		function(result){//服务端处理完毕后的回调函数 List<Student> students， 加上@ResponseBody后， students实质是一个json数组的格式
		for(var i=0;i<result.length ;i++){
		alert(result[i].id +"-"+result[i].name +"-"+result[i].age);
				}
				}
			);
		});
	});
	
</script>
</head>
<body>
    404
</body>
</html>